package io.github.idol.utils

import android.app.Application
import io.github.idol.ViewModelFactory
import io.github.idol.data.ApiRepository

/**
 * Created by codeczx on 2018/8/1 下午 10:36.
 * Class description:
 */

object InjectorUtils{

    private fun getApiRepository(): ApiRepository {
        return ApiRepository.INSTANCE
    }

    fun provideLoginViewModelFactory(application: Application): ViewModelFactory {
        return ViewModelFactory(application, getApiRepository())
    }

    fun provideRoomDetailViewModelFactory(application: Application):ViewModelFactory{
        return ViewModelFactory(application, getApiRepository())
    }
}